1. Technical Field
The embodiments herein generally relate to wireless technologies, and more particularly to WiFi technologies.
2. Description of the Related Art
In IEEE standards 802.11a/b/g/n, more commonly known as WiFi, packets containing data, information, or connection requirements are transmitted and received by an access point (AP) and a station. The physical (PHY) layer 46 is responsible for demodulating signals received over the air before passing data bits on to the Media Access Control (MAC) layer 48 and for modulating data bits from the MAC layer 48 to be transmitted over the air. FIG. 1A depicts an overall WiFi PHY/MAC architecture 40 of a WiFi application specific integrated circuit (ASIC). Data and management packets are transferred through the interface between MAC layer 48 and PHY layer 46 as MAC frames 50 (shown in FIG. 1B). MAC frames 50 (as shown in FIG. 1B) have variable size according to their data or management payload.
The WiFi-MAC frame formats: As indicated in FIG. 1B, a MAC frame 50 contains the MAC header 52, frame body 54, and frame check sequence (FCS) 56; so the MAC frame 50 is the error-detection and retransmission unit. The MAC frame 50 can be either a control frame, a management frame (MMPDU), or a data frame (MPDU). Control frames are processed on the fly and not stored in the shared memory. Control frames do not have a frame body. Examples are RTS, CTS, ACK, and blockACK. Management frames (MMPDU) are stored in the shared memory and processed by the MLME (MAC layer management entity). MMPDUs are very important and should have higher priority than normal data frames, so a small buffer control is suggested to ensure that there is some space in the memory for expected management frames. Examples are beacons and association exchange frames. Data frames (MPDU) are passed to or from the host and stored in the shared memory. The constituting block is the MSDU. A data frame (MPDU) can carry a fragment of the MSDU, a complete MSDU, or an aggregated MSDU (AMSDU, this is more than one MSDU separated by short headers).
Furthermore, with respect to aggregation, the physical layer (PHY) payload (called PSDU) can be a control frame, a MMPDU, a MPDU, or an aggregated MPDU (A-MPDU, this is more than one MPDU separated by short headers). One or more MPDUs and/or A-MPDUs can be acknowledged with on eframe called a block-ACK. However, inside the block-ACK each MPDU is acknowledged (and thus can be retransmitted) separately. A MPDU in an A-MPDU and can carry a single MSDU or A-MSDU. The latter case forms the two-level aggregation. FIG. 2A illustrates a one-level frame aggregation for A-MSDU. FIG. 2B illustrates a one-level frame aggregation for A-MPDU. FIG. 3 illustrates a two-level frame aggregation.
There are further rules and limits: With respect to fragmentation (as shown in FIG. 4), all maximum of 16 fragments should be supported. With respect to A-MSDU, the maximum number of aggregated MSDUs has no limit. The maximum length: either 3839 or 7395 bytes. One permanent value is supported by the STA upon association with an AP. The A-MSDU cannot be fragmented. With respect to A-MPDU, the maximum number of aggregated MPDUs: min(64, window size). The maximum length=either 8, 16, 32, or 64 kB. One permanent value is supported by the STA upon association with an AP. The window size mentioned above can be controlled and negotiated every data transfer operation. The whole window size is expected to be supported by the peer memory. MPDUs within the window size may not be sent in order. A constituting MPDU can carry one MSDU or one AMSDU as far as the MPDU length does not exceed 4 kB. Two-level aggregation is optional and can be controlled and negotiated every data transfer operation. The A-MPDU cannot be fragmented. With respect to the PSDU, the maximum time of min(the available channel opportunity, 10 ms).
Next, with respect to UP, TID, and AC: There are 8 user priorities (UPs) that are available according to the data content. Along with 8 other reserved values for contention-free channels, these 16 values form the TID value. Each 2 relevant UPs are mapped to one of four Access Category (AC), namely: Voice, Video, Best effort and background data. Channel access rules vary according to ACs. Management frames shall be sent using the voice (highest-priority) AC. FIG. 5 illustrates the mapping of UPs to ACs.
The conventional architecture uses a shared memory architecture with a shared descriptor memory and the shared packet memory. A special memory is dedicated for temporary storage of MAC frames in the following cases: Frames waiting to be transmitted on the air; Frames waiting to be acknowledged by the addressed WiFi station; Frames waiting to be reordered after reception from the air; and Frames waiting to be passed to upper protocol layers. Due to the different cases above, a MAC frame should be written, accessed and deleted from this memory independent of other MAC frames. The memory can be logically divided into equally-sized chunks, so that each chunk can carry the maximum-length MAC frame, but this results in memory dissipation since MAC frames can have smaller lengths than the maximum length. Therefore, it would be desirable to find a way to support fast access to any variable-sized MAC frame in the memory while reducing the memory overhead.